home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / ifp1s157.zip / PAGE_18.PAS < prev    next >
Pascal/Delphi Source File  |  1993-06-26  |  53KB  |  1,995 lines

  1. unit page_18;
  2.  
  3. interface
  4.  
  5. uses crt, dos, ifpextrn, ifpglobl, ifpcomon;
  6.  
  7. procedure page18;
  8.  
  9. implementation
  10.  
  11. procedure page18;
  12.  
  13. var
  14.   i : 1..63;
  15.   s: string;
  16.   xlong: longint;
  17.   SaveX, Savey: byte;
  18.  
  19.  
  20.  
  21.   procedure Shells;
  22.     var
  23.       xword1: word;
  24.       regs: registers;
  25.  
  26.     begin
  27.     Caption1('----Shells and Shell enhancers----');
  28.     Writeln;
  29.     Caption2('JP Software 4DOS');
  30.     with regs do
  31.       begin
  32.       AX:=$D44D;
  33.       BX:=0;
  34.       CX:=0;
  35.       DX:=0;
  36.       Intr($2F, regs);
  37.       if AX <> $44DD then
  38.         Writeln('no')
  39.       else
  40.         begin
  41.         Writeln('yes');
  42.         Caption3('version');
  43.         xword1:=BH;
  44.         Write(BL, decimal);
  45.         ZeroPad(xword1);
  46.         Caption3('shell no.');
  47.         Write(DL);
  48.         Caption3('PSP segment');
  49.         Writeln(Hex(CX, 4))
  50.         end;
  51.       end;
  52.     Pause3(-1);
  53.     if endit then
  54.       Exit;
  55.     Caption2('JP Software KSTACK.COM');
  56.     with regs do
  57.       begin
  58.       AX:=$D44F;
  59.       BX:=0;
  60.       CX:=0;
  61.       DX:=0;
  62.       Intr($2F, regs);
  63.       yesorno(AX = $44DD);
  64.       end;
  65.     Pause3(-2);
  66.     if endit then
  67.       Exit;
  68.     Caption2('Norton NDOS');
  69.     with regs do
  70.       begin
  71.       AX:=$E44D;
  72.       BX:=0;
  73.       CX:=0;
  74.       DX:=0;
  75.       Intr($2F, regs);
  76.       if AX <> $44EE then
  77.         Writeln('no')
  78.       else
  79.         begin
  80.         Writeln('yes');
  81.         Caption3('version');
  82.         xword1:=BH;
  83.         Write(BL, decimal);
  84.         ZeroPad(xword1);
  85.         Caption3('shell no.');
  86.         Write(DL);
  87.         Caption3('PSP segment');
  88.         Writeln(Hex(CX, 4))
  89.         end;
  90.       end;
  91.     Pause3(-1);
  92.     if endit then
  93.       Exit;
  94.     Caption2('WildUnix');
  95.     with regs do
  96.       begin
  97.       AH:=$4E;
  98.       DS:=0;
  99.       DX:=0;
  100.       MsDos(regs);
  101.       yesorno(AH = $99);
  102.       end;
  103.     Pause3(-1);
  104.     if endit then
  105.       Exit;
  106.     Caption2('Anarkey');
  107.     with regs do
  108.       begin
  109.       AX:=$E300;
  110.       Intr($2F, regs);
  111.       case AL of
  112.         $00: Writeln('no');
  113.         $FE: Writeln('yes; but suspended');
  114.         $FF: Writeln('yes; and active');
  115.       else
  116.         Writeln('???')
  117.       end
  118.       end;
  119.     end; {Shells}
  120.  
  121.   procedure DosExtenders;
  122.     var
  123.       xbool1: boolean;
  124.       xbyte: byte;
  125.  
  126.     begin
  127.     Pause3(-1);
  128.     if endit then
  129.       Exit;
  130.     Caption1('----DOS Extenders----');
  131.     Writeln;
  132.     Caption2('DOS/16M');
  133.     with regs do
  134.       begin
  135.       AX:=$BF02;
  136.       DX:=0;
  137.       Intr($15, regs);
  138.       yesorno(DX <> 0);
  139.       end;
  140.     Pause3(-4);
  141.     if endit then
  142.       Exit;
  143.     Caption2('Phar Lap DOS Extender');
  144.     xbool1:=false;
  145.     xbyte:=1;
  146.     with regs do
  147.       repeat
  148.         AX:=$ED00;
  149.         BL:=xbyte;
  150.         Intr($2F, regs);
  151.         if (AL = $FF) and (SI = $5048 {PH}) and (DI = $4152 {AR}) then
  152.           begin
  153.           xbool1:=true;
  154.           Write('yes');
  155.           Caption3('type');
  156.           case xbyte of
  157.             1: Write('286dosx v1.3+ SDK');
  158.             2: Write('286dosx v1.3+ RTK');
  159.             3: Write('386dosx v4.0+ SDK');
  160.             4: Write('386dosx v4.0+ RTK')
  161.           end;
  162.           Caption3('version');
  163.           Write(CH, decimal);
  164.           ZeroPad(CL);
  165.           end;
  166.         Inc(xbyte);
  167.       until xbyte > 4;
  168.     if not xbool1 then
  169.       Writeln('no');
  170.     end; {DosExtenders}
  171.  
  172.   procedure MemUtils;
  173.     type
  174.       T386maxbuf = record
  175.                      version: byte;
  176.                      signature: array[1..6] of char;
  177.                      verstr: array[1..4] of char;
  178.                      lowseg: word;
  179.                      unkw1: word;
  180.                      unkw2: word;
  181.                      flags1: word;
  182.                      unk1: array [1..16] of byte;
  183.                      int15port: word;
  184.                      int67port: word;
  185.                      unkw3: word;
  186.                      unkw4: word;
  187.                      unkd1: longint;
  188.                      unkd2: longint;
  189.                      sysconfig: word;
  190.                      unk2: array [1..8] of byte;
  191.                      flags2: word;
  192.                      flags3: word;
  193.                      flags4: word;
  194.                      unkw5: word;
  195.                      extfree: word;
  196.                      unkd3: longint;
  197.                      unkw6: word;
  198.                      unkd4: longint;
  199.                      flags5: word;
  200.                      oldint21ofs: word;
  201.                      oldint21seg: word;
  202.                      emsofs: word;
  203.                      emsseg: word;
  204.                      extra: byte;
  205.                    end;
  206.  
  207.     var
  208.       V386maxbuf: T386maxbuf;
  209.       QEMMid: byte;
  210.       xword: word;
  211.       xbyte: byte;
  212.       xlong: longint;
  213.       foundit: boolean;
  214.  
  215.     begin
  216.     Pause3(-3);
  217.     if endit then
  218.       Exit;
  219.     Caption1('----Memory Managers and Memory utilities----');
  220.     Writeln;
  221.     Caption2('QEMM');
  222.     with regs do
  223.       begin
  224.       QEMMid:=$D2;
  225.       foundit:=false;
  226.       repeat
  227.         AH:=QEMMId;
  228.         AL:=0;
  229.         BX:=$5144; {'QD'}
  230.         CX:=$4D45; {'ME'}
  231.         DX:=$4D30; {'M0'}
  232.         Intr($2F, regs);
  233.         if (AL = $FF) and (BX = $4D45) and (CX = $4D44) and (DX = $5652) then
  234.           foundit:=true
  235.         else
  236.           begin
  237.           if QEMMid < $FF then
  238.             Inc(QEMMid)
  239.           else
  240.             QEMMid:=$C0;
  241.           end;
  242.       until foundit or (QEMMid = $D2);
  243.       if not foundit then
  244.         Writeln('no')
  245.       else
  246.         begin
  247.         AH:=QEMMid;
  248.         AL:=1;
  249.         BX:=$5145; {'QE'}
  250.         CX:=$4D4D; {'MM'}
  251.         DX:=$3432; {'42'}
  252.         Intr($2F, regs);
  253.         if BX = $4F4B {'OK'} then
  254.           begin
  255.           Write('yes');
  256.           Caption3('API entry');
  257.           SegOfs(ES, DI);
  258.           xlong:=longint(ES) shl 16 + DI;
  259.           Caption3('version');
  260.           AH:=3;
  261.           longcall(xlong, regs);
  262.           if not nocarry(regs) then
  263.             Write('error')
  264.           else
  265.             Write(unBCD(BH), decimal, AddZero(unBCD(BL)));
  266.           xword:=BX;
  267.           Caption3('status');
  268.           AH:=0;
  269.           longcall(xlong, regs);
  270.           if not nocarry(regs) then
  271.             Write('error')
  272.           else
  273.             if AL and 1 = 1 then
  274.               Write('OFF')
  275.             else
  276.               if AL and 2 = 2 then
  277.                  Write('Auto')
  278.               else
  279.                 Write('ON');
  280.           Writeln;
  281.           Caption3('High RAM');
  282.           AH:=$12;
  283.           longcall(xlong, regs);
  284.           if not nocarry(regs) then
  285.             Write('error')
  286.           else
  287.             begin
  288.             yesorno2(BX <> 0);
  289.             if BX <> 0 then
  290.               begin
  291.               Caption3('first MCB at');
  292.               Write(Hex(BX, 4));
  293.               end;
  294.             end;
  295.           if Hi(xword) >= 6 then
  296.             begin
  297.             Caption3('Stealth');
  298.             AX:=$1E00;
  299.             longcall(xlong, regs);
  300.             if not nocarry(regs) then
  301.               Write('error')
  302.             else
  303.               begin
  304.               case CL of
  305.                   0: Write('OFF');
  306.                 $46: Write('Frame');
  307.                 $4D: Write('Map')
  308.               else
  309.                 Write('????');
  310.               end;
  311.               if (CL = $46) or (CL = $4D) then
  312.                 begin
  313.                 Caption3('Stealthed ROMs');
  314.                 AX:=$1E01;
  315.                 longcall(xlong, regs);
  316.                 if not nocarry(regs) then
  317.                   Write('error')
  318.                 else
  319.                   Write(BX);
  320.                 end;
  321.               end;
  322.             end;
  323.           Writeln;
  324.           end
  325.         else
  326.           Writeln('no')
  327.         end;
  328.       Pause3(-1);
  329.       if endit then
  330.         Exit;
  331.       Caption2('Quarterdeck Manifest (memory resident)');
  332.       if not foundit then
  333.         Writeln('no')
  334.       else
  335.         begin
  336.         AH:=QEMMid;
  337.         AL:=1;
  338.         BX:=$4D41; {'MA'}
  339.         CX:=$4E49; {'NI'}
  340.         DX:=$4645; {'FE'}
  341.         Intr($2F, regs);
  342.         yesorno(BX = $5354 {'ST'});
  343.         end;
  344.       Pause3(-3);
  345.       if endit then
  346.         Exit;
  347.       Caption2('Quarterdeck VIDRAM');
  348.       if not foundit then
  349.         Writeln('no')
  350.       else
  351.         begin
  352.         AH:=QEMMid;
  353.         AL:=1;
  354.         BX:=$5649; {'VI'}
  355.         CX:=$4452; {'DR'}
  356.         DX:=$414D; {'AM'}
  357.         Intr($2F, regs);
  358.         if BX = $4F4B {'OK'} then
  359.           begin
  360.           Write('yes');
  361.           Caption3('at code segment');
  362.           Write(Hex(ES, 4));
  363.           xlong:=longint(ES) shl 16 + DI;
  364.           AH:=0;
  365.           LongCall(xlong, regs);
  366.           Caption3('state');
  367.           case AL of
  368.             0: Write('off');
  369.             1: Write('no EGA');
  370.             2: Write('no graphics')
  371.           else
  372.             Write(AL, '???');
  373.           end;
  374.           Writeln;
  375.           Caption3('extra RAM');
  376.           case BL of
  377.             0: Write('not used');
  378.             1: Write('from EGA');
  379.             2: Write('from EMS')
  380.           else
  381.             Write(BL, '???')
  382.           end;
  383.           Caption3('override');
  384.           if BH and 1 = 1 then
  385.             Write('enabled')
  386.           else
  387.             Write('disabled');
  388.           Caption3('MDA detected');
  389.           YesOrNo(BH and 8 = 8);
  390.           Caption3('monitor type');
  391.           case CL of
  392.               0: Write('default');
  393.               1: Write('mono');
  394.             $80: Write('color')
  395.           else
  396.             Write(CL, '???');
  397.           end;
  398.           Caption3('memory top at');
  399.           Writeln(Hex(SI, 4), ' (', SI div 64, 'K)');
  400.           end
  401.         else
  402.           Writeln('no');
  403.         end
  404.       end;
  405.     Pause3(-2);
  406.     if endit then
  407.       Exit;
  408.     Caption2('386^Max');
  409.     with regs do
  410.       begin
  411.       s:='386MAX$$'#0;
  412.       AX:=$3D00;
  413.       DS:=Seg(s);
  414.       DX:=Ofs(s) + 1;
  415.       MsDos(regs);
  416.       if not nocarry(regs) then
  417.         Writeln('no')
  418.       else
  419.         begin
  420.         xbyte:=AX;
  421.         AX:=$4402;
  422.         BX:=xbyte;
  423.         CX:=$5A;
  424.         DS:=Seg(V386Maxbuf);
  425.         DX:=Ofs(V386Maxbuf);
  426.         V386Maxbuf.version:=3;
  427.         MsDos(regs);
  428.         if not nocarry(regs) then
  429.           Writeln('Maybe; IOCTL call failed')
  430.         else
  431.           with V386maxbuf do
  432.             if signature <> '386MAX' then
  433.               Writeln('No; wrong signature found - "', signature, '"')
  434.             else
  435.               begin
  436.               Write('yes');
  437.               Caption3('version');
  438.               Write(verstr[1], decimal, verstr[3], verstr[4]);
  439.               Caption3('at segment');
  440.               Writeln(Hex(lowseg, 4));
  441.               Caption3('EMS active');
  442.               yesorno2(flags1 and $0080 = $0080);
  443.               Caption3('Windows 3 support');
  444.               yesorno(flags4 and 1 <> 1);
  445.               end;
  446.         AH:=$3E;
  447.         BX:=xbyte;
  448.         MsDos(regs);
  449.         end
  450.       end;
  451.     Pause3(-1);
  452.     if endit then
  453.       Exit;
  454.     Caption2('MICEMM');
  455.     if not EMSOK then
  456.       Writeln('no')
  457.     else
  458.       with Regs do
  459.         begin
  460.         AX:=$58F0;
  461.         Intr($67, Regs);
  462.         if AH <> 0 then
  463.           Writeln('no')
  464.         else
  465.           begin
  466.           Write('yes');
  467.           Caption3('Code Segment');
  468.           Writeln(Hex(BX, 4));
  469.           end;
  470.         end;
  471.     Pause3(-1);
  472.     if EndIt then
  473.       Exit;
  474.     Caption2('EMM386');
  475.     if not EMSOK then
  476.       Writeln('no')
  477.     else
  478.       with Regs do
  479.         begin
  480.         AX:=$FFA5;
  481.         Intr($67, Regs);
  482.         if AX <> $845A then
  483.           Writeln('no')
  484.         else
  485.           begin
  486.           Write('yes');
  487.           Caption3('API entry');
  488.           SegOfs(BX, CX);
  489.           Caption3('Status');
  490.           xlong:=longint(BX) shl 16 + CX;
  491.           AH:=0;
  492.           LongCall(xlong, Regs);
  493.           if AL and 1 = 1 then
  494.             Write('ON')
  495.           else
  496.             Write('OFF');
  497.           Caption3('Weitek');
  498.           AH:=2;
  499.           AL:=0;
  500.           LongCall(xlong, Regs);
  501.           if AL and 1 = 1 then
  502.             begin
  503.             Write('present ');
  504.             if AL and 2 = 2 then
  505.               Writeln('and enabled')
  506.             else
  507.               Writeln('but disabled')
  508.             end
  509.           else
  510.             Writeln('not present');
  511.           end;
  512.         end;
  513.     Pause3(-4);
  514.     if endit then
  515.       Exit;
  516.     Caption2('Virtual DMA Spec. (VDS)');
  517.     with regs do
  518.       begin
  519.       AX:=$354B;
  520.       MsDos(regs);
  521.       if (ES = 0) and (BX = 0) then
  522.         Writeln('no')
  523.       else
  524.         begin
  525.         AX:=$8102;
  526.         DX:=0;
  527.         Flags:=FCarry;
  528.         Intr($4B, regs);
  529.         yesorno2(nocarry(regs));
  530.         if nocarry(regs) then
  531.           begin
  532.           Caption3('version');
  533.           Write(AH, decimal, Hex(AL, 2));
  534.           Caption3('product');
  535.           case BX of
  536.             $0000: Write('QMAPS/HPMM');
  537.             $0001: Write('EMM386');
  538.             $0003: Write('Windows 3');
  539.             $4560: Write('386^Max');
  540.             $4D53: Write('Memory Cmdr');
  541.             $5145: Write('QEMM')
  542.           else
  543.             Write(BX);
  544.           end;
  545.           Caption3('rev.');
  546.           Writeln(CH, decimal, Hex(CL, 2));
  547.           Caption3('max. DMA buffer size');
  548.           Write((longint(SI) * 65536 + DI)/1024:0:1, 'K');
  549.           Caption3('transfers OK in');
  550.           if DX and 1 = 1 then
  551.             Writeln('First Meg only')
  552.           else
  553.             Writeln('any address');
  554.           Caption3('buffer in first meg');
  555.           yesorno2(DX and 2 = 2);
  556.           Caption3('auto-remap enabled');
  557.           yesorno2(DX and 4 = 4);
  558.           Caption3('contiguous memory');
  559.           yesorno(DX and 8 = 8);
  560.           Caption3('BIOS Data bit set');
  561.           yesorno(Mem[$40:$7B] and $20 = $20);
  562.           end
  563.         else
  564.           Writeln;
  565.         end;
  566.       end;
  567.     end; {MemUtils}
  568.  
  569.   procedure MultiTaskers;
  570.  
  571.     function windev(device: byte): word;
  572.       var
  573.         regs: registers;
  574.         saveit: word;
  575.  
  576.       begin
  577.       with regs do
  578.         begin
  579.         AX:=$1682;
  580.         Intr($2F, regs);
  581.         AX:=$170A;
  582.         DX:=device;
  583.         Intr($2F, regs);
  584.         windev:=AX
  585.         end
  586.       end; {windev}
  587.  
  588.     const
  589.       winclass: array[0..6] of string[21] = ('vector plotter', 'raster display',
  590.                   'raster printer', 'raster camera', 'character-stream, PLP',
  591.                   'Metafile, VDM', 'display-file');
  592.  
  593.     var
  594.       xword1: word;
  595.  
  596.     begin
  597.     Pause3(-6);
  598.     if endit then
  599.       Exit;
  600.     Caption1('----Multi-Taskers and Task Switchers + Utilities---');
  601.     Writeln;
  602.     Caption2('Quarterdeck Desqview');
  603.     if OSMajor >= 10 then
  604.       Writeln('no')
  605.     else
  606.       begin
  607.       with regs do
  608.         begin
  609.         AX:=$2B01;
  610.         CX:=$4445; {DE}
  611.         DX:=$5351; {SQ}
  612.         MsDos(regs);
  613.         if AL = $FF then
  614.           Writeln('no')
  615.         else
  616.           begin
  617.           Write('yes');
  618.           Caption3('version');
  619.           if BX = $0002 then
  620.             Writeln('2', decimal, '00')
  621.           else
  622.             begin
  623.             Write(BH, decimal);
  624.             ZeroPad(BL);
  625.             Writeln;
  626.             end;
  627.           Caption3('window number');
  628.           AX:=$DE07;
  629.           Intr($15, regs);
  630.           Write(AX);
  631.           Caption3('true video mode');
  632.           AX:=$DE1E;
  633.           Intr($15, regs);
  634.           Write(BL);
  635.           Caption3('width');
  636.           Write(CH);
  637.           Caption3('height');
  638.           Writeln(CL);
  639.           Caption3('      common memory -> avail');
  640.           AX:=$DE04;
  641.           Intr($15, regs);
  642.           Write(BX:6);
  643.           Caption3('largest');
  644.           Write(CX:6);
  645.           Caption3('total');
  646.           Writeln(DX:6);
  647.           Caption3('conventional memory -> avail');
  648.           AX:=$DE05;
  649.           Intr($15, regs);
  650.           Write(BX:5, 'K');
  651.           Caption3('largest');
  652.           Write(CX:5, 'K');
  653.           Caption3('total');
  654.           Writeln(DX:5, 'K');
  655.           Caption3('    expanded memory -> avail');
  656.           AX:=$DE06;
  657.           Intr($15, regs);
  658.           Write(BX:5, 'K');
  659.           Caption3('largest');
  660.           Write(CX:5, 'K');
  661.           Caption3('total');
  662.           Writeln(DX:5, 'K');
  663.           end;
  664.         end;
  665.       end;
  666.     Pause3(-1);
  667.     if endit then
  668.       Exit;
  669.     Caption2('DOS 5 task switcher');
  670.     with regs do
  671.       begin
  672.       AX:=$4B02;
  673.       BX:=0;
  674.       ES:=0;
  675.       DI:=0;
  676.       Intr($2F, regs);
  677.       if nocarry(regs) and (AX = 0) and (BX = 0) then
  678.         begin
  679.         Write('yes');
  680.         Caption3('switcher entry point');
  681.         SegOfs(ES, DI);
  682.         Writeln;
  683.         end
  684.       else
  685.         Writeln('no');
  686.       end;
  687.     Pause3(-1);
  688.     if endit then
  689.       Exit;
  690.     Caption2('DRDOS TaskMAX');
  691.     with regs do
  692.       begin
  693.       AX:=$2700;
  694.       BX:=0;
  695.       CX:=0;
  696.       Intr($2F, regs);
  697.       if AL <> $FF then
  698.         Writeln('no')
  699.       else
  700.         begin
  701.         Write('yes');
  702.         Caption3('version');
  703.         AX:=$2701;
  704.         Intr($2F, regs);
  705.         Write(DX);
  706.         Caption3('maximum tasks');
  707.         Write(AX);
  708.         Caption3('active tasks');
  709.         Writeln(CX)
  710.         end;
  711.       end;
  712.     Pause3(-1);
  713.     if endit then
  714.       Exit;
  715.     Caption2('TAME');
  716.     with regs do
  717.       begin
  718.       AX:=$2B01;
  719.       CX:=$5441;
  720.       DX:=$4D45;
  721.       MsDos(regs);
  722.       if AL <> 2 then
  723.         Writeln('no')
  724.       else
  725.         begin
  726.         Write('yes');
  727.         Caption3('data area');
  728.         Writeln(Hex(ES, 4), ':', Hex(DX, 4))
  729.         end
  730.       end;
  731.     Pause3(-6);
  732.     if endit then
  733.       Exit;
  734.     Caption2('Microsoft Windows');
  735.     with regs do
  736.       begin
  737.       AX:=$1600;
  738.       Intr($2F, regs);
  739.       case AL of
  740.       $01,$FF: begin
  741.                Writeln('yes');
  742.                Caption3('version');
  743.                Writeln('Windows/386 2.x')
  744.                end;
  745.       $00,$80: begin
  746.                AX:=$4680;
  747.                Intr($2F, regs);
  748.                if AX = 0 then
  749.                  begin
  750.                  Writeln('yes');
  751.                  Caption3('mode');
  752.                  Writeln('Real or Standard')
  753.                  end
  754.                else
  755.                  Writeln('no');
  756.                end;
  757.       $02..$7F,$81..$FE: begin
  758.                          Writeln('yes');
  759.                          Caption3('version');
  760.                          Write(AL, decimal, AH, ' enhanced mode');
  761.                          Caption3('Virtual Machine ID');
  762.                          AX:=$1683;
  763.                          Intr($2F, regs);
  764.                          Writeln(BX);
  765.                          Caption3('WINOLDAP support');
  766.                          AX:=$1700;
  767.                          Intr($2F, regs);
  768.                          if AX = $1700 then
  769.                            Writeln('no')
  770.                          else
  771.                            begin
  772.                            Write('yes');
  773.                            Caption3('version');
  774.                            Writeln(AL, decimal, AH);
  775.                            end;
  776.                          Caption3('Driver version');
  777.                          xword1:=windev(0);
  778.                          Write(Hi(xword1), decimal, Lo(xword1));
  779.                          Caption3('Device type');
  780.                          Writeln(winclass[Lo(windev(2))]);
  781.                          Caption3('Pixel width');
  782.                          Write(windev(8));
  783.                          Caption3('height');
  784.                          Write(windev($A));
  785.                          Caption3('colors');
  786.                          Write(windev($18));
  787.                          Caption3('bits/pixel');
  788.                          Write(windev($C));
  789.                          Caption3('bit planes');
  790.                          Writeln(windev($E));
  791.                          Caption3('X aspect');
  792.                          Write(windev($28));
  793.                          Caption3('Y aspect');
  794.                          Writeln(windev($2A));
  795.                          Caption3('brushes');
  796.                          Write(windev($10));
  797.                          Caption3('pens');
  798.                          Write(windev($12));
  799.                          Caption3('markers');
  800.                          Write(windev($14));
  801.                          Caption3('fonts');
  802.                          Writeln(windev($16));
  803.                          end;
  804.       end; {case}
  805.       end;
  806.     end; {MultiTaskers}
  807.  
  808.   procedure NortonUtils;
  809.     procedure nortonstatus(b: byte);
  810.       begin
  811.       case b of
  812.         0: Write('disabled');
  813.         1: Write('enabled')
  814.       else
  815.         Write('unknown')
  816.       end
  817.       end; {nortonstatus}
  818.  
  819.     var
  820.       regs: registers;
  821.  
  822.     begin
  823.     Pause3(-1);
  824.     if endit then
  825.       Exit;
  826.     Caption1('----Norton Utilities----');
  827.     Writeln;
  828.     Caption2('Norton NCACHE');
  829.     with regs do
  830.       begin
  831.       AX:=$FE00;
  832.       BX:=0;
  833.       CX:=0;
  834.       DX:=0;
  835.       DI:=$4E55; {NU}
  836.       SI:=$4346; {CF}
  837.       Intr($2F, regs);
  838.       if SI = $6366 {cf} then
  839.         begin
  840.         Write('yes (NCACHE-F or NCACHE v6+)');
  841.         Caption3('status');
  842.         nortonstatus(AH);
  843.         Writeln;
  844.         end
  845.       else
  846.         begin
  847.         AX:=$FE00;
  848.         BX:=0;
  849.         CX:=0;
  850.         DX:=0;
  851.         DI:=$4E55; {NU}
  852.         SI:=$4353; {CS}
  853.         Intr($2F, regs);
  854.         if SI = $6373 {cs} then
  855.           begin
  856.           Write('yes (NCACHE-S)');
  857.           Caption3('status');
  858.           nortonstatus(AH);
  859.           Writeln
  860.           end
  861.         else
  862.           Writeln('no');
  863.         end
  864.       end;
  865.     Pause3(-1);
  866.     if endit then
  867.       Exit;
  868.     Caption2('Norton Diskreet');
  869.     with regs do
  870.       begin
  871.       AX:=$FE00;
  872.       BX:=0;
  873.       CX:=0;
  874.       DX:=0;
  875.       DI:=$4E55; {NU}
  876.       SI:=$4443; {DC}
  877.       Intr($2F, regs);
  878.       if SI = $6463 {dc} then
  879.         begin
  880.         Write('yes');
  881.         Caption3('status');
  882.         nortonstatus(AH);
  883.         Caption3('resident at');
  884.         Writeln(Hex(CX, 4))
  885.         end
  886.       else
  887.         Writeln('no');
  888.       end;
  889.     Pause3(-1);
  890.     if endit then
  891.       Exit;
  892.     Caption2('Norton DiskMon');
  893.     with regs do
  894.       begin
  895.       AX:=$FE00;
  896.       BX:=0;
  897.       CX:=0;
  898.       DX:=0;
  899.       DI:=$4E55; {NU}
  900.       SI:=$444D; {DM}
  901.       Intr($2F, regs);
  902.       if SI = $646D {dm} then
  903.         begin
  904.         Write('yes');
  905.         Caption3('status');
  906.         nortonstatus(AH);
  907.         Caption3('resident at');
  908.         Writeln(Hex(CX, 4));
  909.         end
  910.       else
  911.         Writeln('no');
  912.       end;
  913.     Pause3(-1);
  914.     if endit then
  915.       Exit;
  916.     Caption2('Norton FileSave/EraseProtect');
  917.     with regs do
  918.       begin
  919.       AX:=$FE00;
  920.       BX:=0;
  921.       CX:=0;
  922.       DX:=0;
  923.       DI:=$4E55; {NU}
  924.       SI:=$4653; {FS}
  925.       Intr($2F, regs);
  926.       if SI = $6673 {fs} then
  927.         begin
  928.         Write('yes');
  929.         Caption3('resident at');
  930.         Writeln(Hex(CX, 4));
  931.         end
  932.       else
  933.         Writeln('no');
  934.       end;
  935.    end; {NortonUtils}
  936.  
  937.    procedure VirusUtils;
  938.      var
  939.        regs: registers;
  940.  
  941.      begin
  942.      Pause3(-2);
  943.      if endit then
  944.        Exit;
  945.      Caption1('----Virus protectors---');
  946.      Writeln;
  947.      Caption2('F-PROT package -> F-LOCK');
  948.      with regs do
  949.        begin
  950.        AX:=$4653;
  951.        BX:=0;
  952.        CX:=2;
  953.        Intr($2F, regs);
  954.        yesorno2(AX = $FFFF);
  955.        Caption3('F-XCHK');
  956.        AX:=$4653;
  957.        BX:=0;
  958.        CX:=3;
  959.        Intr($2F, regs);
  960.        yesorno2(AX = $FFFF);
  961.        Caption3('F-POPUP');
  962.        AX:=$4653;
  963.        BX:=0;
  964.        CX:=4;
  965.        Intr($2F, regs);
  966.        yesorno2(AX = $FFFF);
  967.        Caption3('F-DLOCK');
  968.        AX:=$4653;
  969.        BX:=0;
  970.        CX:=5;
  971.        Intr($2F, regs);
  972.        yesorno(AX = $FFFF)
  973.        end;
  974.      Pause3(-1);
  975.      if endit then
  976.        Exit;
  977.      Caption2('TBScanX');
  978.      with regs do
  979.        begin
  980.        AX:=$CA00;
  981.        BX:=$5442; {TB}
  982.        Intr($2F, regs);
  983.        if (AL <> $FF) or (BX <> $7462 {tb}) then
  984.          Writeln('no')
  985.        else
  986.          begin
  987.          Write('yes');
  988.          Caption3('version');
  989.          AX:=$CA01;
  990.          Intr($2F, regs);
  991.          if AH <> $CA then
  992.            Write(AH shr 4, decimal, AddZero(AH and $F))
  993.          else
  994.            Write('2.2-');
  995.          Caption3('status');
  996.          if AL = 0 then
  997.            Writeln('disabled')
  998.          else
  999.            Writeln('enabled');
  1000.          end
  1001.        end;
  1002.      Pause3(-1);
  1003.      if endit then
  1004.        Exit;
  1005.      Caption2('Flu_Shot+');
  1006.      with regs do
  1007.        begin
  1008.        AX:=$FF0F;
  1009.        MsDos(regs);
  1010.        yesorno(AX = $0101);
  1011.        end;
  1012.      end; {VirusUtils}
  1013.  
  1014.   procedure SCSI;
  1015.     var
  1016.       xword1: word;
  1017.       regs: registers;
  1018.  
  1019.     begin
  1020.     Pause3(-2);
  1021.     if endit then
  1022.       Exit;
  1023.     Caption1('----SCSI drivers----');
  1024.     Writeln;
  1025.     Caption2('Common Access Method SCSI (CAM-SCSI)');
  1026.     with regs do
  1027.       begin
  1028.       AX:=$354F;
  1029.       MsDos(regs);
  1030.       if (ES <> 0) and (BX <> 0) then
  1031.         begin
  1032.         AX:=$8200;
  1033.         CX:=$8765;
  1034.         DX:=$CBA9;
  1035.         Intr($4F, regs);
  1036.         if (CX = $9ABC) and (DX=$5678) then
  1037.           begin
  1038.           s:='';
  1039.           for xword1:=DI to DI + 7 do
  1040.             s:=s + Chr(Mem[ES:xword1]);
  1041.           yesorno(s = 'SCSI_CAM');
  1042.           end
  1043.         else
  1044.           Writeln('no');
  1045.         end;
  1046.       end;
  1047.     Pause3(-1);
  1048.     if endit then
  1049.       Exit;
  1050.     Caption2('CMC International SCSI driver');
  1051.     with regs do
  1052.       begin
  1053.       AX:=$3578;
  1054.       MsDos(regs);
  1055.       s:='';
  1056.       for xword1:=BX + 3 to BX + 6 do
  1057.         s:=s + Chr(Mem[ES:xword1]);
  1058.       yesorno(s = 'SCSI');
  1059.       end;
  1060.     end; {SCSI}
  1061.  
  1062.   procedure DiskCaches;
  1063.     type
  1064.       smartdrvt = record
  1065.                write_through: byte;
  1066.                write_buffered: byte;
  1067.                cache_enabled: byte;
  1068.                drivertype: byte;
  1069.                cticks: word;
  1070.                locked: byte;
  1071.                reboot_flush: byte;
  1072.                full_track_write: byte;
  1073.                buffering_type: byte;
  1074.                origInt13ofs: word;
  1075.                origInt13seg: word;
  1076.                minorversion: byte;
  1077.                majorversion: byte;
  1078.                reserved: word;
  1079.                secs_read: word;
  1080.                secs_in_cache: word;
  1081.                secs_in_trk_buf: word;
  1082.                cache_hitrate: byte;
  1083.                track_buf_hitrate: byte;
  1084.                total_tracks: word;
  1085.                tracks_used: word;
  1086.                locked_tracks: word;
  1087.                dirty_tracks: word;
  1088.                current_size: word;
  1089.                original_size: word;
  1090.                minimum_size: word;
  1091.                lock_pointer_ofs: word;
  1092.                lock_pointer_seg: word;
  1093.              end;
  1094.  
  1095.     var
  1096.       xbyte: byte;
  1097.       smartdrvbuf: smartdrvt;
  1098.       xbool1: boolean;
  1099.       regs: registers;
  1100.       foundit: boolean;
  1101.  
  1102.     begin
  1103.     Pause3(-4);
  1104.     if endit then
  1105.       Exit;
  1106.     Caption1('----Disk Caches----');
  1107.     Writeln;
  1108.     Caption2('SMARTDRV');
  1109.     with regs do
  1110.       begin
  1111.       s:='SMARTAAR'#0;
  1112.       AX:=$3D00;
  1113.       DS:=Seg(s);
  1114.       DX:=Ofs(s) + 1;
  1115.       MsDos(regs);
  1116.       if not nocarry(regs) then
  1117.         begin
  1118.         AX:=$4A10;
  1119.         BX:=0;
  1120.         CX:=0;
  1121.         DX:=0;
  1122.         Intr($2F, regs);
  1123.         if AX = $BABE then
  1124.           begin
  1125.           Write('yes');
  1126.           Caption3('ver');
  1127.           Write(unBCD(Hi(BP)), decimal, AddZero(unBCD(Lo(BP))));
  1128.           Caption3('size now');
  1129.           AX:=$4A10;
  1130.           BX:=4;
  1131.           Intr($2F, regs);
  1132.           Write((longint(CX) * BX) div 1024, 'K');
  1133.           Caption3('min size');
  1134.           Write((longint(DX) * CX) div 1024, 'K');
  1135.           Caption3('element size');
  1136.           Writeln(CX div 1024, 'K');
  1137.           Caption3('cache hits');
  1138.           AX:=$4A10;
  1139.           BX:=0;
  1140.           Intr($2F, regs);
  1141.           Write(longint(DX) shl 16 + BX);
  1142.           Caption3('cache misses');
  1143.           Writeln(longint(DI) shl 16 + SI);
  1144.           for xbyte:=0 to $19 do
  1145.             begin
  1146.             Pause3(-1);
  1147.             if endit then
  1148.               Exit;
  1149.             AX:=$4A10;
  1150.             BX:=3;
  1151.             BP:=xbyte;
  1152.             DX:=0;
  1153.             Intr($2F, regs);
  1154.             if (DL <> $FF) then
  1155.               begin
  1156.               Caption3('Drive');
  1157.               Write(Chr(xbyte + Ord('A')));
  1158.               Caption3('read');
  1159.               yesorno3(DL and $80 <> $80);
  1160.               Caption3('write');
  1161.               yesorno3(DL and $40 <> $40);
  1162.               Caption3('buffered');
  1163.               AX:=$4A10;
  1164.               BX:=5;
  1165.               BP:=xbyte;
  1166.               Intr($2F, regs);
  1167.               yesorno3(AX = $BABE);
  1168.               Caption3('DBLSPACE');
  1169.               AX:=$4A11;
  1170.               BX:=0;
  1171.               Intr($2F, regs);
  1172.               if (AX = 0) and (BX = $444D) then
  1173.                 begin
  1174.                 AX:=$4A11;
  1175.                 BX:=1;
  1176.                 DL:=xbyte;
  1177.                 Intr($2F, regs);
  1178.                 if AX = 0 then
  1179.                   begin
  1180.                   yesorno3(BL and $80 = $80);
  1181.                   if BL and $80 = $80 then
  1182.                     begin
  1183.                     Write(' ', Chr((BL and $7F) + Ord('A')), ':\DBLSPACE.');
  1184.                     ZeroPad3(BH);
  1185.                     end;
  1186.                   end
  1187.                 else
  1188.                   Write('(error ', Hex(AX, 4), ')');
  1189.                 Writeln;
  1190.                 end
  1191.               else
  1192.                 Writeln('no');
  1193.               end;
  1194.             end;
  1195.           end
  1196.         else
  1197.           Writeln('no')
  1198.         end
  1199.       else
  1200.         begin
  1201.         xbyte:=AX;
  1202.         AX:=$4400;
  1203.         BX:=xbyte;
  1204.         MsDos(regs);
  1205.         if (not nocarry(regs)) or (DX and $4080 <> $4080) then
  1206.           Writeln('Maybe. IOCTL interface not supported.')
  1207.         else
  1208.           begin
  1209.           AX:=$4402;
  1210.           BX:=xbyte;
  1211.           CX:=SizeOf(smartdrvbuf);
  1212.           DS:=Seg(smartdrvbuf);
  1213.           DX:=Ofs(smartdrvbuf);
  1214.           MsDos(regs);
  1215.           if not nocarry(regs) then
  1216.             Writeln('Maybe. IOCTL read failed.')
  1217.           else
  1218.             begin
  1219.             Write('yes');
  1220.             with smartdrvbuf do
  1221.               begin
  1222.               Caption3('ver.');
  1223.               Write(majorversion, decimal, minorversion);
  1224.               Caption3('Size');
  1225.               Write(current_size * 16, 'K');
  1226.               Caption3('Max');
  1227.               Write(original_size * 16, 'K');
  1228.               Caption3('Min');
  1229.               Write(minimum_size * 16, 'K');
  1230.               Caption3('enabled');
  1231.               yesorno(cache_enabled = 1);
  1232.               Caption3('locked tracks');
  1233.               yesorno2(locked > 0);
  1234.               Caption3('write-through');
  1235.               yesorno2(write_through = 1);
  1236.               Caption3('write-buffered');
  1237.               yesorno2(write_buffered = 1);
  1238.               Caption3('hit rate');
  1239.               Writeln(cache_hitrate, '%');
  1240.               Caption3('DMA buffering');
  1241.               case buffering_type of
  1242.                 0: Write('off');
  1243.                 1: Write('on');
  1244.                 2: Write('dynamic')
  1245.               else
  1246.                 Write('(unknown)');
  1247.               end; {case}
  1248.               Caption3('memory type');
  1249.               case drivertype of
  1250.                 1: Write('XMS');
  1251.                 2: Write('EMS')
  1252.               else
  1253.                 Write('unknown:', drivertype);
  1254.               end;
  1255.               Caption3('flush on reboot');
  1256.               yesorno(reboot_flush <> 0);
  1257.               Caption3('Tracks total');
  1258.               Write(total_tracks);
  1259.               Caption3('used');
  1260.               Write(tracks_used);
  1261.               Caption3('locked');
  1262.               Write(locked_tracks);
  1263.               Caption3('dirty');
  1264.               Writeln(dirty_tracks);
  1265.               end
  1266.             end
  1267.           end;
  1268.         AH:=$3E;
  1269.         BX:=xbyte;
  1270.         MsDos(regs);
  1271.         end
  1272.       end;
  1273.     Pause3(-4);
  1274.     if endit then
  1275.       Exit;
  1276.     Caption2('HyperDisk');
  1277.     with regs do
  1278.       begin
  1279.       xbyte:=$DF;
  1280.       foundit:=false;
  1281.       xbool1:=false;
  1282.       repeat
  1283.         AH:=xbyte;
  1284.         AL:=0;
  1285.         BX:=$4448; {DH}
  1286.         Intr($2F, regs);
  1287.         if (AL = $FF) and (CX = $5948 {YH}) then
  1288.           foundit:=true
  1289.         else
  1290.           if (xbyte = $DF) and (not xbool1) then
  1291.             begin
  1292.             xbyte:=$C0;
  1293.             xbool1:=true;
  1294.             end
  1295.           else
  1296.             Inc(xbyte);
  1297.       until (xbyte = 0) or (foundit);
  1298.       if xbyte = 0 then
  1299.         Writeln('no')
  1300.       else
  1301.         begin
  1302.         Write('yes');
  1303.         Caption3('at code segment');
  1304.         Write(Hex(BX, 4));
  1305.         Caption3('local data version');
  1306.         Write(DH, decimal);
  1307.         ZeroPad(DL);
  1308.         Writeln;
  1309.         AH:=xbyte;
  1310.         AL:=1;
  1311.         BX:=$4448; {DH}
  1312.         Intr($2F, regs);
  1313.         if AX = 0 then
  1314.           begin
  1315.           Caption3('buffers used');
  1316.           Write(BX);
  1317.           Caption3('buffers modified but not yet written');
  1318.           Writeln(CX);
  1319.           Caption3('   Floppies - cached');
  1320.           YesOrNo3(DL and $40 = $40);
  1321.           Caption3('verified');
  1322.           YesOrNo3(DL and 4 = 4);
  1323.           Caption3('staged writes');
  1324.           YesOrNo(DL and 1 = 1);
  1325.           Caption3('Hard Drives - cached');
  1326.           YesOrNo3(DL and $80 = $80);
  1327.           Caption3('verified');
  1328.           YesOrNo3(DL and 8 = 8);
  1329.           Caption3('staged writes');
  1330.           YesOrNo(DL and 2 = 2);
  1331.           end;
  1332.         end;
  1333.       end;
  1334.     end; {DiskCaches}
  1335.  
  1336.   procedure DiskCompress;
  1337.     type
  1338.       stackerbuft = record
  1339.                   signature: word;
  1340.                   unknown: word;
  1341.                   ddofs: word;
  1342.                   ddseg: word
  1343.                 end;
  1344.  
  1345.     var
  1346.       xbyte, xbyte2: byte;
  1347.       stackerbuf: stackerbuft;
  1348.       xword, xword1, xword2: word;
  1349.       DSSect, DSFreeSect, DriveSect, FreeSect: longint;
  1350.       regs: registers;
  1351.       foundit: boolean;
  1352.  
  1353.     begin
  1354.     Pause3(-4);
  1355.     if endit then
  1356.       Exit;
  1357.     Caption1('----Disk Compressors----');
  1358.     Writeln;
  1359.     xword1:=Seg(stackerbuf);
  1360.     xword2:=Ofs(stackerbuf);
  1361.     Caption2('Stacker');
  1362.       asm
  1363.       mov  ax,$CDCD       {signature entry}
  1364.       mov  cx,1
  1365.       mov  dx,0
  1366.       push ds             {need to preserve these}
  1367.       push bp
  1368.       mov  ds,xword1      {pointer to address buffer}
  1369.       mov  bx,xword2
  1370.       int  $25            {DOS absolute read sectors}
  1371.       pop  cx             {remove old flags}
  1372.       pop  bp             {restore important regs}
  1373.       pop  ds
  1374.       mov  xword1,ax      {save return code}
  1375.       end;
  1376.     with stackerbuf do
  1377.       begin
  1378.       if (signature = $CDCD) and (MemW[ddseg:ddofs] = $A55A) then
  1379.         begin
  1380.         Write('yes');
  1381.         Caption3('version');
  1382.         Write((MemW[ddseg:ddofs + 2] / 100.0):5:2);
  1383.         Caption3('at address');
  1384.         SegOfs(ddseg, ddofs);
  1385.         Writeln;
  1386.         Caption3('Stacker drive(s)');
  1387.         foundit:=false;
  1388.         if (OSMajor = 3) and (OSMinor = 31) then
  1389.           xword:=$440E
  1390.         else
  1391.           xword:=$4408;
  1392.         for xbyte:=1 to 26 do
  1393.           with Regs do
  1394.             begin
  1395.             BX:=xbyte;
  1396.             AX:=xword;
  1397.             Mem[ddseg:ddofs + $3E]:=$FF;
  1398.             MsDos(Regs);
  1399.             xbyte2:=Mem[ddseg:ddofs + $3E];
  1400.             if Mem[ddseg:ddofs + $3E] <> $FF then
  1401.               begin
  1402.               Write(Chr(xbyte + $40), ' ');
  1403.               foundit:=true
  1404.               end
  1405.             end;
  1406.         if not foundit then
  1407.           Write('(none)');
  1408.         Writeln;
  1409.         Caption3('Swapped');
  1410.         foundit:=false;
  1411.         s:='';
  1412.         for xword:=ddofs + $52 to ddofs + $55 do
  1413.           s:=s + Chr(Mem[ddseg:xword]);
  1414.         if s = 'SWAP' then
  1415.           for xbyte:=0 to 25 do
  1416.             if Mem[ddseg:ddofs + $56 + xbyte] <> xbyte then
  1417.               begin
  1418.               if foundit then
  1419.                 Write(', ');
  1420.               Write(Chr(xbyte + $41), ' was ',
  1421.                     Chr(Mem[ddseg:ddofs + $56 + xbyte] + $41));
  1422.               foundit:=true;
  1423.               end;
  1424.         if not foundit then
  1425.           Write('(none)');
  1426.         Writeln;
  1427.         end
  1428.       else
  1429.         Writeln('no');
  1430.       end;
  1431.     Pause3(-1);
  1432.     if endit then
  1433.       Exit;
  1434.     Caption2('DBLSPACE');
  1435.     with regs do
  1436.       begin
  1437.       AX:=$4A11;
  1438.       BX:=0;
  1439.       Intr($2F, regs);
  1440.       if (AX = 0) and (BX = $444D) then
  1441.         begin
  1442.         Write('yes');
  1443.         Caption3('First drive');
  1444.         Write(Chr(CL));
  1445.         Caption3('Last drive');
  1446.         Writeln(Chr(CL + CH - 1));
  1447.         xbool1:=false;
  1448.         for xbyte:=0 to $19 do
  1449.           begin
  1450.           Pause3(-4);
  1451.           if endit then
  1452.             Exit;
  1453.           AX:=$4A11;
  1454.           BX:=1;
  1455.           DL:=xbyte;
  1456.           Intr($2F, regs);
  1457.           if (AX = 0) and (BL and $80 = $80) then
  1458.             begin
  1459.             xbool1:=true;
  1460.             Caption3('Drive');
  1461.             Write(Chr(xbyte + Ord('A')));
  1462.             Caption3('Host');
  1463.             Write(Chr((BL and $7F) + Ord('A')), ':\DBLSPACE.');
  1464.             ZeroPad3(BH);
  1465.             AX:=$4A11;
  1466.             BX:=7;
  1467.             DL:=xbyte;
  1468.             Intr($2F, regs);
  1469.             if AX = 0 then
  1470.               begin
  1471.               Caption3('sectors');
  1472.               DSSect:=longint(MemW[DS:SI] + MemW[DS:SI + 2] * 65536);
  1473.               Write(DSSect);
  1474.               Caption3('free sectors');
  1475.               DSFreeSect:=longint(MemW[DS:SI + 4] + MemW[DS:SI + 6] * 65536);
  1476.               Write(DSFreeSect);
  1477.               end;
  1478.             Writeln;
  1479.             SaveX:=WhereX;
  1480.             SaveY:=WhereY;
  1481.             TextColor(LightRed+Blink);
  1482.             Write('  *retrieving information*');
  1483.             AH:=$1C;
  1484.             DL:=xbyte + 1;
  1485.             MsDos(regs);
  1486.             GotoXY(SaveX, SaveY);
  1487.             Write('                          ');
  1488.             GotoXY(SaveX, SaveY);
  1489.             if AL <> $FF then
  1490.               begin
  1491.               DriveSect:=longint(DX) * longint(AL);
  1492.               Caption3('  estimated ratio');
  1493.               Write((DriveSect / DSSect):5:2, ':1');
  1494.               AH:=$36;
  1495.               DL:=xbyte + 1;
  1496.               MsDos(regs);
  1497.               DriveSect:=longint(DX) * longint(AX);
  1498.               FreeSect:=longint(BX) * longint(AX);
  1499.               Caption3('actual ratio');
  1500.               Write(((DriveSect - FreeSect) / (DSSect - DSFreeSect)):5:2, ':1');
  1501.               end;
  1502.             Writeln;
  1503.             AX:=$4A11;
  1504.             BX:=8;
  1505.             DL:=xbyte;
  1506.             Intr($2F, regs);
  1507.             if AX = 0 then
  1508.               begin
  1509.               Caption3('  maximum File Fragment heap entries');
  1510.               Write(BX);
  1511.               Caption3('available');
  1512.               Write(CX);
  1513.               end;
  1514.             Writeln;
  1515.             AX:=$4A11;
  1516.             BX:=3;
  1517.             CL:=xbyte;
  1518.             Intr($2F, regs);
  1519.             if CL <> $FF then
  1520.               begin
  1521.               Caption3('  Driver strategy');
  1522.               SegOfs(ES, SI);
  1523.               Caption3('Driver interrupt');
  1524.               SegOfs(ES, DI);
  1525.               end;
  1526.             Writeln;
  1527.             end;
  1528.           end;
  1529.         if not xbool1 then
  1530.           Writeln('No DBLSPACE drives found!');
  1531.         end
  1532.       else
  1533.         Writeln('no');
  1534.       end;
  1535.     end; {DiskCompress}
  1536.  
  1537.   procedure MiscUtils;
  1538.     const
  1539.       pcAstatus: array[$FFFC..$FFFF] of string[23] = ('resident and active',
  1540.                    'resident and not active', 'memory resident mode',
  1541.                    'automatic mode');
  1542.       pcAspd: array[0..$F] of word = (50, 75, 110, 134, 150, 300, 600, 1200, 1800,
  1543.                 2000, 2400, 4800, 7200, 9600, 19200, 38400);
  1544.       KeyScan: array[0..255] of string[5] =
  1545.        {00}( '??', 'ESC',   '1',   '2',   '3',   '4',   '5',   '6',   '7',   '8',
  1546.        {10}   '9',   '0',   '-',   '=',  'BS', 'TAB',   'Q',   'W',   'E',   'R',
  1547.        {20}   'T',   'Y',   'U',   'I',   'O',   'P',   '[',   ']', 'ENT',  '??',
  1548.        {30}   'A',   'S',   'D',   'F',   'G',   'H',   'J',   'K',   'L',   ';',
  1549.        {40}  '''',   '`',  '??',   '\',   'Z',   'X',   'C',   'V',   'B',   'N',
  1550.        {50}   'M',   ',',   '.',   '/', 'kp*',  '??',  '??',  'SP',  '??',  'F1',
  1551.        {60}  'F2',  'F3',  'F4',  'F5',  'F6',  'F7',  'F8',  'F9', 'F10',  '??',
  1552.        {70}  '??', 'HOME', 'UP','PGUP', 'kp-','LEFT', 'kp5','RIGHT','kp+', 'END',
  1553.        {80}'DOWN', 'PGDN','INS', 'DEL',  'F1',  'F2',  'F3',  'F4',  'F5',  'F6',
  1554.        {90}  'F7',  'F8',  'F9', 'F10',  'F1',  'F2',  'F3',  'F4',  'F5',  'F6',
  1555.       {100}  'F7',  'F8',  'F9', 'F10',  'F1',  'F2',  'F3',  'F4',  'F5',  'F6',
  1556.       {110}  'F7',  'F8',  'F9', 'F10',  '??','LEFT','RIGHT','END','PGDN','HOME',
  1557.       {120}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1558.       {130}  '??',  '??','PGUP', 'F11', 'F12', 'F11', 'F12', 'F11', 'F12', 'F11',
  1559.       {140} 'F12',  'UP', 'kp-', 'kp5', 'kp+','DOWN', 'INS', 'DEL',  '??', 'kp/',
  1560.       {150}  '??','HOME',  'UP','PGUP',  '??','LEFT',  '??','RIGHT', '??', 'END',
  1561.       {160}'DOWN','PGDN', 'INS', 'DEL', 'kp/',  '??','kpENT', '??',  '??',  '??',
  1562.       {170}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1563.       {180}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1564.       {190}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1565.       {200}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1566.       {210}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1567.       {220}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1568.       {230}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1569.       {240}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1570.       {250}  '??',  '??',  '??',  '??',  '??',  '??');
  1571.  
  1572.     type
  1573.       fossilbuft = record
  1574.                      fbufsize: word;
  1575.                      spec: byte;
  1576.                      rev: byte;
  1577.                      idstrofs: word;
  1578.                      idstrseg: word;
  1579.                      inbufsize: word;
  1580.                      infree: word;
  1581.                      outbufsize: word;
  1582.                      outfree: word;
  1583.                      scrwidth: byte;
  1584.                      scrlen: byte;
  1585.                      baudrate: byte;
  1586.                      extra: array[1..13] of byte;
  1587.                    end;
  1588.       vfossilbuft = record
  1589.                       fbufsize: word;
  1590.                       ver: word;
  1591.                       rev: word;
  1592.                       hifunc: word
  1593.                     end;
  1594.     var
  1595.       xbyte: byte;
  1596.       xword1: word;
  1597.       xbool1: boolean;
  1598.       xchar: char;
  1599.       fossilbuf: fossilbuft;
  1600.       vfossilbuf: vfossilbuft;
  1601.       regs: registers;
  1602.       foundit: boolean;
  1603.  
  1604.     begin
  1605.     Pause3(-2);
  1606.     if endit then
  1607.       Exit;
  1608.     Caption1('----Miscellaneous----');
  1609.     Writeln;
  1610.     Caption2('pcAnywhere');
  1611.     with regs do
  1612.       begin
  1613.       AH:=$79;
  1614.       Intr($16, regs);
  1615.       if AX < $FFFC then
  1616.         Writeln('no')
  1617.       else
  1618.         begin
  1619.         Write(pcAstatus[AX]);
  1620.         Caption3('port');
  1621.         AH:=$7C;
  1622.         Intr($16, regs);
  1623.         Write(AH);
  1624.         Caption3('baud rate');
  1625.         Writeln(pcAspd[AL]);
  1626.         end;
  1627.       end;
  1628.     Pause3(-5);
  1629.     if endit then
  1630.       Exit;
  1631.     Caption2('Disk Spool II');
  1632.     with regs do
  1633.       begin
  1634.       AH:=$A0;
  1635.       Intr($1A, regs);
  1636.       if AH = $B0 then
  1637.         begin
  1638.         Write('yes');
  1639.         Caption3('at segment');
  1640.         Writeln(Hex(ES, 4));
  1641.         Caption3('spooler is');
  1642.         case CH of
  1643.           $00: Writeln('disabled');
  1644.           $41: begin
  1645.                Writeln('enabled');
  1646.                Caption3('spooling file');
  1647.                xbyte:=0;
  1648.                repeat
  1649.                  xchar:=Chr(Mem[ES:BX]);
  1650.                  if xchar <> #0 then
  1651.                    Write(xchar);
  1652.                  Inc(xbyte);
  1653.                  Inc(BX);
  1654.                until (xchar = #0) or (xbyte >= 64);
  1655.                if xbyte = 0 then
  1656.                  Write('(none)');
  1657.                Writeln;
  1658.                end;
  1659.         else
  1660.           Writeln('??')
  1661.         end;
  1662.         Caption3('despooler is');
  1663.         case CL of
  1664.           $00: Writeln('disabled');
  1665.           $41: begin
  1666.                Write('enabled and ');
  1667.                case DL of
  1668.                  $00: Writeln('actively printing');
  1669.                  $41: Writeln('standing by');
  1670.                else
  1671.                  Writeln('?????');
  1672.                end;
  1673.                Caption3('despooler file');
  1674.                xbyte:=0;
  1675.                repeat
  1676.                  xchar:=Chr(Mem[ES:SI]);
  1677.                  if xchar <> #0 then
  1678.                    Write(xchar);
  1679.                  Inc(xbyte);
  1680.                  Inc(SI);
  1681.                until (xchar = #0) or (xbyte >= 64);
  1682.                if xbyte = 0 then
  1683.                  Write('(none)');
  1684.                Writeln;
  1685.                end;
  1686.         else
  1687.           Writeln('????');
  1688.         end;
  1689.         end
  1690.       else
  1691.         Writeln('no');
  1692.       end;
  1693.     Pause3(-1);
  1694.     if endit then
  1695.       Exit;
  1696.     Caption2('Microsoft/LANtastic Network');
  1697.     regs.AH:=0;
  1698.     Intr($2A, regs);
  1699.     yesorno(regs.AH <> 0);
  1700.     Pause3(-1);
  1701.     if endit then
  1702.       Exit;
  1703.     Caption2('PC/TCP Packet driver');
  1704.     with regs do
  1705.       begin
  1706.       xbyte:=$60;
  1707.       foundit:=false;
  1708.       repeat
  1709.         AH:=$35;
  1710.         AL:=xbyte;
  1711.         MsDos(regs);
  1712.         s:='';
  1713.         for xword1:=BX + 3 to BX + $A do
  1714.           s:=s + Chr(Mem[ES:xword1]);
  1715.         if s = 'PKT DRVR' then
  1716.           foundit:=true;
  1717.         Inc(xbyte);
  1718.       until foundit or (xbyte = $81);
  1719.       if foundit then
  1720.         Writeln('yes, at interrupt $', Hex(xbyte - 1, 2))
  1721.       else
  1722.         Writeln('no')
  1723.       end;
  1724.     Pause3(-1);
  1725.     if endit then
  1726.       Exit;
  1727.     Caption2('Inset');
  1728.     with regs do
  1729.       begin
  1730.       AH:=2;
  1731.       DX:=0;
  1732.       CX:=$07C3; {1987}
  1733.       Intr($17, regs);
  1734.       yesorno(CX = $07C2 {1986})
  1735.       end;
  1736.     Pause3(-1);
  1737.     if endit then
  1738.       Exit;
  1739.     Caption2('Microsoft CD-ROM extensions');
  1740.     asm
  1741.     mov ax,$DADA
  1742.     push ax
  1743.     mov ax,$1100
  1744.     int $2F
  1745.     mov xbyte,al
  1746.     pop bx
  1747.     mov xword1,bx
  1748.     end;
  1749.     if (xbyte <> $FF) or (xword1 <> $ADAD) then
  1750.       Writeln('no')
  1751.     else
  1752.       with regs do
  1753.         begin
  1754.         Write('yes');
  1755.         Caption3('version');
  1756.         AX:=$150C;
  1757.         Intr($2F, regs);
  1758.         if BX = 0 then
  1759.           Writeln('1.xx')
  1760.         else
  1761.           Writeln(BH, decimal, addzero(unBCD(BL)));
  1762.         end;
  1763.     Pause3(-2);
  1764.     if endit then
  1765.       Exit;
  1766.     Caption2('Fossil');
  1767.     xbool1:=false;
  1768.     with regs do
  1769.       begin
  1770.       AH:=$BC;
  1771.       DX:=$1954;
  1772.       Intr($11, regs);
  1773.       if AX = $1954 then
  1774.         xbool1:=true;
  1775.       AX:=$1B00;
  1776.       DX:=$FF;
  1777.       CX:=SizeOf(fossilbuf);
  1778.       ES:=Seg(fossilbuf);
  1779.       DI:=Ofs(fossilbuf);
  1780.       Intr($14, regs);
  1781.       if AX <> $1B00 then
  1782.         begin
  1783.         Write('yes');
  1784.         Caption3('type');
  1785.         if xbool1 then
  1786.           Write('BNU')
  1787.         else
  1788.           if (CX = $3058 {0X}) and (DX = $2030 { 0}) then
  1789.             Write('X00')
  1790.           else
  1791.             Write('unknown');
  1792.         with fossilbuf do
  1793.           begin
  1794.           Caption3('specification level');
  1795.           Write(spec);
  1796.           Caption3('revision level');
  1797.           Writeln(rev);
  1798.           Caption3('ID string');
  1799.           while Mem[idstrseg:idstrofs] <> 0 do
  1800.             begin
  1801.             Write(Chr(Mem[idstrseg:idstrofs]));
  1802.             Inc(idstrofs)
  1803.             end;
  1804.           Writeln;
  1805.           end
  1806.         end
  1807.       else
  1808.         Writeln('no');
  1809.       end;
  1810.     Pause3(-1);
  1811.     if endit then
  1812.       Exit;
  1813.     Caption2('Video Fossil');
  1814.     with regs do
  1815.       begin
  1816.       AX:=$8100;
  1817.       ES:=Seg(vfossilbuf);
  1818.       DI:=Ofs(vfossilbuf);
  1819.       Intr($14, regs);
  1820.       if AX <> $1954 then
  1821.         Writeln('no')
  1822.       else
  1823.         with vfossilbuf do
  1824.           begin
  1825.           Write('yes');
  1826.           Caption3('version');
  1827.           Write(ver);
  1828.           Caption3('revision');
  1829.           Write(rev);
  1830.           Caption3('highest function');
  1831.           Write('$', Hex(hifunc, 4));
  1832.           end
  1833.       end;
  1834.     Pause3(-3);
  1835.     if endit then
  1836.       Exit;
  1837.     Caption2('Advanced Power Management Spec.');
  1838.     with regs do
  1839.       begin
  1840.       AX:=$5300;
  1841.       BX:=0;
  1842.       Intr($15, regs);
  1843.       if (not NoCarry(regs)) or (BX <> $504D) then
  1844.         Writeln('no')
  1845.       else
  1846.         begin
  1847.         Write('yes');
  1848.         Caption3('version');
  1849.         Write(unBCD(AH), decimal, AddZero(unBCD(AL)));
  1850.         Caption3('enabled');
  1851.         YesOrNo((CX and 8) = 0);
  1852.         Caption3('supports 16-bit protected mode');
  1853.         YesOrNo2((CX and 1) = 1);
  1854.         Caption3('32-bit protected mode');
  1855.         YesOrNo((CX and 2) = 2);
  1856.         Caption3('AC line status');
  1857.         AX:=$530A;
  1858.         BX:=1;
  1859.         Intr($15, regs);
  1860.         if not NoCarry(regs) then
  1861.           Writeln('ERROR')
  1862.         else
  1863.           begin
  1864.           case BH of
  1865.               0: Write('off-line');
  1866.               1: Write('on-line');
  1867.             $FF: Write('unknown')
  1868.           else
  1869.             Write('???');
  1870.           end;
  1871.           Caption3('battery status');
  1872.           case BL of
  1873.               0: Write('high');
  1874.               1: Write('low');
  1875.               2: Write('critical');
  1876.               3: Write('charging');
  1877.             $FF: Write('unknown')
  1878.           else
  1879.             Write('???');
  1880.           end;
  1881.           Caption3('remaining life');
  1882.           if CL = $FF then
  1883.             Writeln('unknown')
  1884.           else
  1885.             Writeln(CL, '%');
  1886.           end;
  1887.         end;
  1888.       end;
  1889.     Pause3(-1);
  1890.     if endit then
  1891.       Exit;
  1892.     Caption2('Norton Guides');
  1893.     with regs do
  1894.       begin
  1895.       AX:=$F398;
  1896.       Intr($16, regs);
  1897.       YesOrNo(AX = $6A73);
  1898.       end;
  1899.     Pause3(-1);
  1900.     if endit then
  1901.       Exit;
  1902.     Caption2('After Dark for DOS');
  1903.     with regs do
  1904.       begin
  1905.       AX:=$C000;
  1906.       BX:=0;
  1907.       CX:=0;
  1908.       DX:=0;
  1909.       Intr($2F, regs);
  1910.       if (AL = $FF) and (BX=$4144 {AD}) and (CX=$2D44 {-D}) and
  1911.          (DX=$4F53 {OS}) then
  1912.         begin
  1913.         Write('yes');
  1914.         Caption3('at segment');
  1915.         AX:=$C001;
  1916.         ES:=0;
  1917.         Flags:=Flags and (not FCarry);
  1918.         Intr($2F, regs);
  1919.         if NoCarry(regs) then
  1920.           Write(Hex(ES, 4))
  1921.         else
  1922.           Write('ERROR');
  1923.         Caption3('minutes to wait');
  1924.         AX:=$C004;
  1925.         Flags:=Flags or FCarry;
  1926.         Intr($2F, regs);
  1927.         Writeln(BX);
  1928.         Caption3('blanker');
  1929.         AX:=$C006;
  1930.         Flags:=Flags or FCarry;
  1931.         Intr($2F, regs);
  1932.         if BX = 0 then
  1933.           Write('disabled')
  1934.         else
  1935.           Write('enabled');
  1936.         Caption3('password');
  1937.         AX:=$C00F;
  1938.         Flags:=Flags or FCarry;
  1939.         Intr($2F, regs);
  1940.         if BX = 0 then
  1941.           Write('disabled')
  1942.         else
  1943.           Write('enabled');
  1944.         Caption3('hot key');
  1945.         AX:=$C008;
  1946.         Flags:=Flags or FCarry;
  1947.         Intr($2F, regs);
  1948.         if AX = 0 then
  1949.           begin
  1950.           if CL and 3 <> 0 then
  1951.             Write('<SHIFT>');
  1952.           if CL and 4 = 4 then
  1953.             Write('<CTRL>');
  1954.           if CL and 8 = 8 then
  1955.             Write('<ALT>');
  1956.           Writeln('<', KeyScan[BH], '>')
  1957.           end;
  1958.         end
  1959.       else
  1960.         Writeln('no');
  1961.       end
  1962.     end; {MiscUtils}
  1963.  
  1964.   begin {procedure page_18}
  1965.   Shells;
  1966.   if endit then
  1967.     Exit;
  1968.   DosExtenders;
  1969.   if endit then
  1970.     Exit;
  1971.   MemUtils;
  1972.   if endit then
  1973.     Exit;
  1974.   MultiTaskers;
  1975.   if endit then
  1976.     Exit;
  1977.   NortonUtils;
  1978.   if endit then
  1979.     Exit;
  1980.   VirusUtils;
  1981.   if endit then
  1982.     Exit;
  1983.   SCSI;
  1984.   if endit then
  1985.     Exit;
  1986.   DiskCaches;
  1987.   if endit then
  1988.     Exit;
  1989.   DiskCompress;
  1990.   if endit then
  1991.     Exit;
  1992.   MiscUtils;
  1993.   end;
  1994. end.
  1995.